[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
RIGHT(SEXP,IEXP) (STRING)
Function
Access the right most characters from a string.
Syntax
RIGHT(str,chars)
str = A string expression to take the right most characters of.
chars = An integer expression with the number of characters to take
from the right end of str.
Return Type & Value
STRING
Returns a string with the right most chars characters of str.
Remarks
This function will return a sub string with the right most chars
characters of a specified string. This can be useful in data processing
as well as text formatting. If chars is less than or equal to 0 then the
returned string will be empty. If chars is greater than the length of
str then the returned string will have spaces added to the right to pad
it out to the full length specified.
Examples
WHILE (RANDOM(250) <> 0) PRINT RIGHT(RANDOM(250),4)," "
STRING s
FOPEN 1,"DATA.TXT",O_RD,S_DN
WHILE (!FERR(1)) DO
FGET 1,s
PRINT RTRIM(LEFT(s,25)," ")," - "
PRINTLN RIGHT(s,LEN(s)-25)
ENDWHILE
FCLOSE 1
See Also:
LEFT()
MID()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson